<% setting, items = dashboard_data %>

<div class="panel panel-default" style="min-height: <%= RollbarDashboards::DashboardsHelper::ROLLBAR_DASHBOARD_HEIGHT %>em">
  <div class="panel-heading">
    <%= link_to_if setting.items_url, image_tag('rollbar_dashboards/icon.png', height: '30px'), setting.items_url %>
    <%= title %>
    <%= "Warning: missing Account/Project setting" unless setting.account_and_project_name? %> <%# TODO: remove after migration to make it required %>
  </div>
  <% if items.present? %>
    <table class="table rollbar-table">
      <%= render partial: 'rollbar_dashboards/item', collection: items, locals: {dashboard_setting: setting} %>
    </table>
  <% else %>
    <div class="panel-body"><p>No items found</p></div>
  <% end %>
</div>
